package wishes;

import enums.WishType;
import model.Model;
import interfaces.AbstractWish;

public class WishToTakeMedicine extends AbstractWish {

	private String medicine;
	public WishToTakeMedicine(long startTime, String medicine) {
		super(startTime);
		this.medicine = medicine;
	}

	public boolean canBeFulfilled() {
		return true;
	}

	public boolean fulfill() {
		if (this.canBeFulfilled()) {
			Model.getInstance().getWishes().remove(this);
			return true;
		}
		return false;
	}

	public long getDeadLine() {
		return getStartTime() + Model.ZEIT_STUNDE;
	}

	public String getMedicine() {
		return medicine;
	}

	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("bis ").append(Model.millisToString(getDeadLine()));
		builder.append(" >> Brauche Medizin (").append(medicine).append(")");
		return builder.toString();
	}

	@Override
	public WishType getType() {
		return WishType.WishToTakeMedicine;
	}
}
